import http from "@/utils/request";
import {
	useUserStore,
	useDeviceStore
} from "@/store";
class HomeAPI {
	// test get api
	static getHomeSearch(params = {}) {
		return http.post("/productInfos/home", params, {
			custom: {
				auth: true,
				loading: true,
			},
		});
	}
	static getHomeMyActivity() {
		const deviceStore = useDeviceStore()
		return http.get("/productInfos/myActivity/" + deviceStore.MyShop.id, {
			undefined,
			custom: {
				auth: true,
				loading: true,
			},
		});
	}
	static getMyActivityDetails() {
		const deviceStore = useDeviceStore()
		// ${shopId}
		return http.get(`/productInfos/myActivity/details/${1}/${deviceStore.MyShop.id}` , {
			undefined,
			custom: {
				auth: true,
				loading: true,
			},
		});
	}

}

export default HomeAPI;